{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "77570952",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib as mpl\n",
    "import datetime as timedelta\n",
    "import matplotlib.mlab as ml\n",
    "from mpl_toolkits.mplot3d import Axes3D\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "from sklearn.linear_model import LinearRegression\n",
    "import statsmodels.api as sm\n",
    "from statsmodels.formula.api import ols"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "e28a8e82",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv('Figure 3.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e2d534df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAL8AAACFCAYAAAAKCynNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAANEUlEQVR4nO2d228bVR7Hv3PzxI4vieNce3Fgod2yaXloxQNSK5CoeEfiYVfVin3pI0jLE38BD6AK8bISQmgFr7tFVKoQAi2lLaVIFFrobqBFrWmaOhc7cWzj68ycfTgZ3zJ2Lj5J3ZzfRzqaM+fym5/j75k5njm/icIYA0HIiPqwHSCIhwWJn5AWEj8hLSR+QlpI/IS0kPgJadE7VSqKchrA6fWM+P3+o0888YQQhyzLgq53dGtH7fSqLfJp4/z0008pxtjwmgrGWNfp8OHDTBR3797tKTu9aot82jgAvmMeuqVpDyEtJH5CWkj8hLSQ+AlpIfET0kLiJ6SFxE9IC4mfkBYSPyEtJH5CWkj8hLSQ+AlpESJ+bXYWsG0RpghixxAj/qUl4LPPRJgiiB1D3LTnww+FmSKInUCc+M+dA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d22+0aVkWNE1rLm/sv06+kCoA4FfJRrveX1TLMYDaUolWHNSf8FvFh38Lr7Tc/oT6UCfciqo0zfn9UT+yWhbDk5tYjtCGXl1hKMrWTvjkNeg88wDAuJ14PA4wwLEclHPldQdnO3v3Z+5j7969bY/l5htPNl7E/hhrW0e/Nom2NE031n9TEPQ+HYa//uvYDG/9jUBZLYvopMjXha2FIkMIaSHxE9JC4iekhcRPSAuJn5AWIZFcY2NjSCQSQhza7f8fajd/vl70qRNCIrmOHDnCejGCpxd9EmmLfOoOmvYQ0kLiJ6SFxE9IC4mfkBYSPyEtJH5CWkj8hLSQ+AlpIfET0kLiJ6SFxE9IC4mfkBYSPyEtJH5CWkj8hLSQ+AlpIfET0kJhjI+oLfKpeyiM8RG2RT51B017CGkh8RPSQuInpIXET0gLiZ+QFhI/IS0kfkJaSPyEtJD4CWkh8RPSQuInpIXET0gLiZ+QFhI/IS0kfkJaSPyEtFAk1yNqi3zqHorkeoRtkU/dQdMeQlpI/IS0kPgJaSHxE9JC4iekhcRPSAuJn5AWEj8hLSR+QlpI/IS0kPgJaSHxE9JC4iekhcRPSAuJn5AWEj8hLUIiuQCUFUW5KcYlxACkeshOr9oinzbOQc9SxljXCcB3IuyItNWLPu32z9eLPnWyRdMeQlpI/IS0kPgJaSHxE9JC4iekhcRPSAuJn5AWEj8hLaLEv+4rDR+CrV70SaQt8qlLW8rqEzCCkA6a9hDSQuInpIXET0gLiZ+QFhI/IS3/BxHvtb+Q3BRvAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 216x144 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "mg_1 = df.loc[df['Mea_mg'] == 1]\n",
    "mg_2 = df.loc[df['Mea_mg'] == 2]\n",
    "mg_3 = df.loc[df['Mea_mg'] == 3]\n",
    "mg_4 = df.loc[df['Mea_mg'] == 4]\n",
    "\n",
    "\n",
    "plt.figure(figsize=(3,2))\n",
    "plt.rc('font', size = 15)\n",
    "plt.rc('axes', labelsize = 15)\n",
    "plt.rc('xtick', labelsize = 15)\n",
    "plt.rc('ytick', labelsize = 15)\n",
    "plt.rc('legend', fontsize = 15)\n",
    "plt.rc('figure', titlesize = 15)\n",
    "\n",
    "plt.plot(mg_1[\"Mea_Time\"],mg_1[\"Mea_mV\"], color = 'red', linewidth = 2)\n",
    "plt.plot(mg_2[\"Mea_Time\"],mg_2[\"Mea_mV\"], color = 'green', linewidth = 2)\n",
    "plt.plot(mg_3[\"Mea_Time\"],mg_3[\"Mea_mV\"], color = 'blue', linewidth = 2)\n",
    "plt.plot(mg_4[\"Mea_Time\"],mg_4[\"Mea_mV\"], color = 'purple', linewidth = 2)\n",
    "\n",
    "\n",
    "\n",
    "plt.xticks([0, 600, 1200, 1800, 2400, 3000, 3600, 4200, 4800, 5400], \n",
    "           labels = ['','','','','','','','','',''])\n",
    "plt.yticks([0, 30, 60, 90,120,150, 180], labels = ['','','','','','',''])\n",
    "plt.xlim([0, 5400])\n",
    "plt.ylim([0, 180])\n",
    "plt.tick_params(length = 10) \n",
    "plt.grid(True, alpha=0.5, linestyle='-')\n",
    "\n",
    "plt.title(\"\", loc = 'center')\n",
    "plt.xlabel(\"\")\n",
    "plt.ylabel(\"\")\n",
    "#plt.colorbar()\n",
    "#plt.legend(loc = 2, bbox_to_anchor = (1,1))\n",
    "plt.savefig('Figure 3_a.png',bbox_inches = \"tight\", dpi = 600)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "43801779",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAL8AAACFCAYAAAAKCynNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAW+klEQVR4nO3de1BU993H8ffZK8v9poCAXETkJi4sl3ip5tK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X39nkmVxAtyRJ5kH29TB8gauinqh3n6bc6R9tspJLkiTjnVbKDBVRT9SzRT0x7REclgi/4LBE+AWHJcIvOCwRfsFhifALDkuEX3BYIvyCw7JV+HfZaBxRT9Qbtno2OcMrCKORmPYIDkuEX3BYIvyCwxLhFxyWCL/gsP4XBdNHOvKvJC4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 216x144 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "Cal_mg_1 = df.loc[df['Cal_mg'] == 1]\n",
    "Cal_mg_2 = df.loc[df['Cal_mg'] == 2]\n",
    "Cal_mg_3 = df.loc[df['Cal_mg'] == 3]\n",
    "Cal_mg_4 = df.loc[df['Cal_mg'] == 4]\n",
    "\n",
    "\n",
    "plt.figure(figsize=(3,2))\n",
    "plt.rc('font', size = 15)\n",
    "plt.rc('axes', labelsize = 15)\n",
    "plt.rc('xtick', labelsize = 15)\n",
    "plt.rc('ytick', labelsize = 15)\n",
    "plt.rc('legend', fontsize = 15)\n",
    "plt.rc('figure', titlesize = 15)\n",
    "\n",
    "\n",
    "\n",
    "plt.plot(df[\"Standard_mV\"], df[\"Linear\"], color = 'gray', linewidth = 1, alpha=0.5)\n",
    "plt.plot(df[\"Standard_mV\"], df[\"Log\"], color = 'gray', linewidth = 1, alpha=0.5, linestyle='--')\n",
    "plt.plot(df[\"Standard_mV\"], df[\"Exponential\"], color = 'black', linewidth = 2, alpha=1)\n",
    "\n",
    "\n",
    "plt.scatter(Cal_mg_1[\"Cal_mV\"],Cal_mg_1[\"Cal_mg\"], color = 'red', s = 30, alpha=1)\n",
    "plt.scatter(Cal_mg_2[\"Cal_mV\"],Cal_mg_2[\"Cal_mg\"], color = 'green', s = 30, alpha=1)\n",
    "plt.scatter(Cal_mg_3[\"Cal_mV\"],Cal_mg_3[\"Cal_mg\"], color = 'blue', s = 30, alpha=1)\n",
    "plt.scatter(Cal_mg_4[\"Cal_mV\"],Cal_mg_4[\"Cal_mg\"], color = 'purple', s = 30, alpha=1)\n",
    "\n",
    "plt.xticks([ 90, 100, 110, 120, 130, 140, 150], \n",
    "           labels = ['','','','','','',''])\n",
    "plt.yticks([0, 1, 2, 3,4,5, 6], labels = ['','','','','','',''])\n",
    "plt.xlim([90, 150])\n",
    "plt.ylim([0, 6])\n",
    "plt.tick_params(length = 10) \n",
    "plt.grid(True, alpha=0.5, linestyle='-')\n",
    "\n",
    "plt.title(\"\", loc = 'center')\n",
    "plt.xlabel(\"\")\n",
    "plt.ylabel(\"\")\n",
    "#plt.colorbar()\n",
    "#plt.legend(loc = 2, bbox_to_anchor = (1,1))\n",
    "plt.savefig('Figure 3_b.png',bbox_inches = \"tight\", dpi = 600)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "89256e8d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
